package gof.com.yew.visitor;

public class VisitorDemo {
	
	public static void main(String[] args) {
		PersonalVisitor pv = new PersonalVisitor();
		ComputerPart cp = new CPU();
		ComputerPart ke = new Keboard();
		cp.accept(pv);
		ke.accept(pv);
		System.out.println(pv.getPrice());
	}

}
